package asava.trees;

/**
 * @author Tim Richter
 */
public final class If extends Tree {
    public Tree condition;
    public Tree thenPart;
    public Tree elsePart;

    public If(final Tree condition,
              final Tree thenPart,
              final Tree elsePart) {
        this.condition = condition;
        this.thenPart = thenPart;
        this.elsePart = elsePart;
    }

    @Override
    public int kind() {
        return TreeKind.IF;
    }

    @Override
    public void accept(final TreeVisitor visitor) {
        visitor.visit(this);
    }
}
